package Thread;

import java.io.IOException;
import java.net.SocketException;

import org.apache.commons.net.ftp.FTPClient;

/**
 * ftp用户类
 * @author 张雨
 *
 */
public class Client {
	private FTPClient ftpclient=null;
	
	Client(){  
		ftpclient=new FTPClient();
		try {
			ftpclient.connect("127.0.0.1");
			ftpclient.login("2maomao", "123456");
		    ftpclient.setControlEncoding("GBK");   
		    ftpclient.setFileType(FTPClient.BINARY_FILE_TYPE);    //设置文件类型（二进制）   
		} catch (SocketException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	public FTPClient getClient(){
		return ftpclient;
	}
	

}
